# Contributor: Díaz Urbaneja Diego <sodomon2@gmail.com>
# Maintainer: Díaz Urbaneja Diego <sodomon2@gmail.com>
pkgname=typescript
pkgver=5.4.4
pkgrel=0
pkgdesc="TypeScript is a superset of JavaScript that compiles to clean JavaScript output."
url="https://www.typescriptlang.org/"
arch="noarch"
license="Apache-2.0"
depends="cmd:node"
options="!check" # not implemented
source="https://github.com/microsoft/TypeScript/releases/download/v$pkgver/typescript-$pkgver.tgz"
builddir="$srcdir/package"

package() {
	local destdir="usr/share/node_modules/$pkgname"

	mkdir -p "$pkgdir"/$destdir
	cp -R "$builddir"/* "$pkgdir"/$destdir/

	mkdir -p "$pkgdir"/usr/bin
	ln -s /$destdir/bin/tsc "$pkgdir"/usr/bin/tsc
	ln -s /$destdir/bin/tsserver "$pkgdir"/usr/bin/tsserver
}

sha512sums="
74613656ff1ca55bf0dbcbfc1c23eac9bd3c1336c1511c43a6e849bd3aeeb128547c69e11c169f0ec2dd4b5121871c8be8125013ed9c4f77433c0bfe310ea82f  typescript-5.4.4.tgz
"
